package exception;

public class FinallyDemo {
    public static void main(String[] args) {
        System.out.println("开始运行.....");
        try {
            String str="abc";
            System.out.println(str.length());
            return;
        }
        catch (Exception e){
            System.out.println("程序报错");
        }finally {
            System.out.println("finally代码最终执行");
        }
        System.out.println("程序结束");
    }
}
